/**
 *@module project
 *@name engineeringSupervisionPage
 *@desc 项目管理主页面
 *@author YuXueYing
 *@date 2019-09-09 16:52:27
 */
Ext.define('js.information.InformationListMain', {
    extend: 'Ext.panel.Panel',
    scrollable : true,
    name:'项目管理',
    id:'js.information.InformationListMain',
    requires: ['js.Util', 'js.ctrl.Common'],
    bodyStyle: "background-color:#eee;",
    config: {
        border: false,
        layout: {
            type: 'vbox',
            align: 'stretch'
        }
    },
    initComponent: function () {
        let information = Ext.create('Ext.Component',
            {
                id:'information',
                html:'<div style="height:36px;background:#fff;box-shadow: #666 0px 0px 10px;">' +
                '<div style="float: left" id="EngineeringSupervision">' +
                '<div style="width:100%;font-size: 14px;margin-top: 11px;margin-left:30%;display:inline-block; color: #000;"><span>工程管理</span></div>' +
                '</div>' +
                '<div style="float: left">' +
                '<div style="width:100%;font-size: 14px;margin-top: 11px;margin-left:478%;display:inline-block; color: #000;"><span>></span></div>' +
                '</div>' +
                '<div style="float: left">' +
                '<div style="width:100%;font-size: 14px;margin-top: 11px;margin-left:50;display:inline-block; color: #000;"><span id="titlename">工程进度验收节点</span></div>' +
                '</div>' +
                '</div>'
            });
     /*   let informationNameComponent = {
            xtype: 'component',
            margin: '50 0 -10 30',
            html: '<span id="enterprise_name" style="font-size: 28px;display:inline-block;font-family: 方正兰亭黑;color:#000">20190001 ----- 碧桂园一期</span>'
        };
        let fh={
            xtype: 'component',
            html:'<div id="EngineeringSupervision" style="float:right; font-size:20px;color:#ff4e00;margin-right: 40px;font-weight:bold;cursor:pointer;">返  回</div>'
        };*/

         let params={
             engineering_id:this.engineering_id,
             engineering_no:this.engineering_no,
             num:this.num,
             startDate:this.startDate,
             engineering_name:this.engineering_name
         };
        let informationNameComponent={
            xtype: 'panel',
            margin: '20 0 0 30',
            bodyStyle: "background-color:#eee;",
            items:[{
                xtype:'panel',
                margin: '24 100% -10 30',
                html: '<span id="enterprise_name" style="font-size: 20px;font-weight: bold; width:‘80%";display:inline-block;font-family: 方正兰亭黑;color:#000">'+this.engineering_no+' ----- '+this.engineering_name+'</span>'

            },{
                xtype : "button",
                height:'40',
                cls:'buttonAA',
                id:'enterprise_name',
                handler: this.fanhui,
                width: '100',
                text:'返回'
            }]
        };
        let engineeringSupervisionShowPage = Ext.create('js.foundation.Fh', params);
        this.items = [information,informationNameComponent,engineeringSupervisionShowPage];
        this.callParent(arguments);
        this.on('afterrender',this.goBack);

    },
    goBack:function () {

        Ext.get("EngineeringSupervision").on("click",function(){
            util.sysPanelAdd('js.project.engineeringSupervisionPage');
            let removelist = ['js.information.InformationListMain'];
            for(let i in removelist){
                let cmp = Ext.getCmp(removelist[i]);
                if (cmp) cmp.close();
                if (cmp) cmp.remove(cmp)
            }
        });


    },
    fanhui:function () {
            util.sysPanelAdd('js.project.engineeringSupervisionPage');
            let removelist = ['js.information.InformationListMain'];
            for(let i in removelist){
                let cmp = Ext.getCmp(removelist[i]);
                if (cmp) cmp.close();
                if (cmp) cmp.remove(cmp)
            }
    }
});